﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Data.Objects;

namespace Defero.Model
{
    public class ProductConfiguration : EntityConfiguration<Product>
    {
        public ProductConfiguration() 
        {
            Property(e => e.Id).IsIdentity();
            Property(e => e.Name).HasDefaultMaxLength();
            Property(e => e.UnitPrice).HasDefaultMoneyPrecision();
            Relationship(e => e.Brand);
            Relationship(e => e.Type);
        }
    }
}

